package com.yumeno.epidemic.mapper;

import com.yumeno.epidemic.beans.ProvinceInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ProvinceMapper {
     @Select(value = "SELECT province_id,province_name,province_py " +
             "FROM provinces " +
             "WHERE (provinces.del_flag=0 OR provinces.del_flag IS NULL) " +
             "AND provinces.province_id NOT IN( " +
             "SELECT e.province_id " +
             "FROM epidemics e " +
             "WHERE e.data_year=#{param1} AND e.data_month=#{param2} AND e.data_day =#{param3} " +
             ") ORDER BY provinces.province_id " +
             "LIMIT 0,6  ")
    List<ProvinceInfo> findNoDataProvinces(short year,short month,short day);
}
